<!DOCTYPE html>
<html lang="zh">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>数据类型</title>
</head>
<body>
	
</body>
	<script>
		// typeof   用来查看变量的数据类型
		// 一、数字型
		// var shuzi =  NaN;
		// var shuzi = Number.MAX_VALUE * 5 ;
		// console.log(shuzi);
		// console.log(typeof shuzi);
		// 最大值
		// console.log(Number.MAX_VALUE); //1.7976931348623157e+308
		// 最小值
		// console.log(Number.MIN_VALUE); //5e-324
		// 特殊的
		// console.log(Number.MAX_VALUE * 2) //Infinity ，代表无穷大，大于任何数值 
		// console.log(-Number.MAX_VALUE * 2) //-Infinity ，代表无穷小，大于任何数值
		// console.log(isNaN(1));  //false
		// 二、字符串型
		// var a = '北京天安门';
		// var a = '北京天安门";   //不可以，会报错
		var a = "北京天安门";
		console.log(a);
		console.log(typeof a);
		// var b = "张\\波";
		var b = "张波";
		console.log(b);
		var c = '你是\
谁';
		console.log(c.length);
		console.log(b.length);
		console.log(a.length);
		console.log('zhang'  + '波');
		console.log('zhang'  + 123);
		console.log('123' + '456');
		console.log('123' + 456);
		console.log(123 + 456);
		var age = 20;
		console.log('张波' + age +"了");
		
		var age = prompt("请输入您的年龄");
		alert('您今年'+ age +"岁了")
		console.log(2 > 10);
		console.log(11 > 10);
		var address;
		console.log(address);
		console.log('您好' + address);
		console.log(12 + address);
		console.log(true + address);
		var add = null;
		var adds = '';
		console.log(add);
		console.log(adds);
		console.log(11 + add);
		console.log(typeof (11 + add));
		
		
		
	</script>
</html>